{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Solution(object):\n",
    "    def fizzBuzz(self, n):\n",
    "        \"\"\"\n",
    "        :type n: int\n",
    "        :rtype: List[str]\n",
    "        \"\"\"\n",
    "        s = [None] * (n+1)\n",
    "        for i in range(1, n+1):\n",
    "            if i % 15 == 0:\n",
    "                s[i] = \"FizzBuzz\"\n",
    "            elif i % 5 == 0:\n",
    "                s[i] = \"Buzz\"\n",
    "            elif i % 3 == 0:\n",
    "                s[i] = \"Fizz\"\n",
    "            else:\n",
    "                s[i] = str(i)\n",
    "                \n",
    "        return s[1:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "s = Solution()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['1',\n",
       " '2',\n",
       " 'Fizz',\n",
       " '4',\n",
       " 'Buzz',\n",
       " 'Fizz',\n",
       " '7',\n",
       " '8',\n",
       " 'Fizz',\n",
       " 'Buzz',\n",
       " '11',\n",
       " 'Fizz',\n",
       " '13',\n",
       " '14',\n",
       " 'FizzBuzz']"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s.fizzBuzz(15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
